<?php

namespace app\model;

use think\Model;

class SchoolCate extends Model
{
    protected $pk = 'id'; // 设置主键
    protected $name = 'school_cate'; // 设置表名
    protected $createTime = 'add_time';

    public function children()
    {
        return $this->hasMany(SchoolCate::class, 'pid', 'id');
    }
}